An encoder apparatus is used to detect a linear position or rotation position of a second member that moves relatively to a first member. There are incremental encoder apparatuses that output pulses whose number corresponds to a travel amount, and absolute encoder apparatuses that output data of an absolute position of a detected position.
The incremental encoder apparatus includes a scale attached to the first member, and a head attached to the second member to read the scale. The incremental encoder apparatus outputs an A-phase signal and a B-phase signal that are π/2 out of phase with the relative movement of the second member to the first member.
The incremental encoder apparatus outputs an origin signal (a Z-phase signal) in addition to the A-phase signal and the B-phase signal. This is because the incremental encoder apparatus has a problem that even if the power is turned off and then turned on again, the current position cannot be determined immediately.
In an encoder apparatus described in Patent Literature 1, a reference mark (made of a magnet or iron) is attached in an origin position of the first member, and a magnetic sensor that reads the reference mark is attached to the second member, in order to output the origin signal. A signal obtained from the magnetic sensor is compared with a predetermined threshold to generate a pulse for the origin signal. The origin signal is outputted on the basis of the pulse.